<template>
  <div>
    <div v-if="yyzzinfo.dealStatus == 'PASS'">
      <div class="shxx">
        <h3>{{yyzzinfo.yyzzName}}
          <!--<div class="labelImg"><img src="./imgs/companyShz.png"/> </div>-->
        </h3>
        <ul>
          <li  v-if="yyzzinfo.operatorName">
            <label class="fl lnames">经营者名称</label>
            <label class="fr lreal">{{yyzzinfo.operatorName}}</label>
            <label class="cl"></label>
          </li>
          <li  v-if="yyzzinfo.operatorName">
            <label class="fl lnames">统一社会信用代码</label>
            <label class="fr lreal">{{yyzzinfo.creditCode}}</label>
            <label class="cl"></label>
          </li>
          <li>
            <label class="fl lnames">类型</label>
            <label class="fr lreal">个体工商户</label>
            <label class="cl"></label>
          </li>
          <li v-if="yyzzinfo.operateScope">
            <label class="fl lnames">经营范围</label>
            <label class="fr lreal">{{yyzzinfo.operateScope}}</label>
            <label class="cl"></label>
          </li>
          <!--<li>-->
            <!--<label class="fl lnames">资金数额(元)</label>-->
            <!--<label class="fr lreal">5000</label>-->
            <!--<label class="cl"></label>-->
          <!--</li>-->
          <li>
            <label class="fl lnames">组织形式</label>
            <label class="fr lreal">个人经营</label>
            <label class="cl"></label>
          </li>
          <!--<li>-->
            <!--<label class="fl lnames">从业人数</label>-->
            <!--<label class="fr lreal">1人</label>-->
            <!--<label class="cl"></label>-->
          <!--</li>-->
          <li v-if="yyzzinfo.regDate">
            <label class="fl lnames">注册时间</label>
            <label class="fr lreal">{{yyzzinfo.regDate | timeNumb('yyyy-MM-dd')}}</label>
            <label class="cl"></label>
          </li>
          <li  v-if="yyzzinfo.operatePlace">
            <label class="fl lnames">经营场所</label>
            <label class="fr lreal">{{yyzzinfo.operatePlace}}</label>
            <label class="cl"></label>
          </li>
          <li  v-if="yyzzinfo.regAuthority">
            <label class="fl lnames">登记机关</label>
            <label class="fr lreal">{{yyzzinfo.regAuthority}}</label>
            <label class="cl"></label>
          </li>
        </ul>
      </div>
      <div class="shxx_btn" v-if="yyzzinfo.yyzzAttachId" ><a :href="$store.state.baseImgUrl+yyzzinfo.yyzzAttachId">查看营业执照</a></div>
    </div>

    <div v-if="!yyzzinfo.dealStatus">
      <div class="yxcnoreg">
        <img  style="margin-top:35%;" src="./imgs/noreg.png"/>
        <div class="noreg_tpis">
          您尚未进行工商注册登记，点击
          <label @click="goreg()">
            立即注册
          </label>
        </div>
      </div>
    </div>
    <div v-if="yyzzinfo.dealStatus =='SUBMIT'">
      <div class="yxcnoreg">
        <img  style="margin-top:35%;" src="./imgs/noreg.png"/>
        <div class="noreg_tpis">
          您工商注册登记已提交
          <label @click="goregState()">
            查看详情
          </label>
        </div>
      </div>
    </div>
    <div v-if="yyzzinfo.dealStatus =='REJECT'">
      <div class="yxcnoreg">
        <img  style="margin-top:35%;" src="./imgs/noreg.png"/>
        <div class="noreg_tpis">
          您的工商注册登记被驳回
          <div v-if="yyzzinfo.errorReason" style="color:red;font-size:14px;">驳回原因:{{yyzzinfo.errorReason}}</div>
          <label @click="goreg()">
            重新申请
          </label>
        </div>
      </div>
    </div>



  </div>

</template>

<script>
  export default {
    name: "shxx",
    data(){
      return{
        yyzzinfo:{}
      }
    },
    created(){
      this.getyyzz();
    },
    methods:{
      goJdDetail(){
        this.$router.push({
          path:'/personCar',
          query:{
            funCode:'pcar5'
          }
        })
      },
      goreg(){
        this.$router.push({
          path:'/personCar',
          query:{
            funCode:'pcar3'
          }
        })
      },
      goregState(){
        this.$router.push({
          path:'/personCar',
          query:{
            funCode:'pcar5',
            backCode:'companyinfo'
          }
        })
      },
      getyyzz(){
        this.$http.get('yxc/merchant/viewMerByWxUserId').then(res=>{
          if(res.code == 200){
          this.yyzzinfo = res.data
        }
      })
      }
    }
  }
</script>

<style lang="scss" scoped>
  .yxcnoreg{
    text-align: center;
    img{width:50%; position: relative; margin-top:50px;}
    font-size:14px;
    .noreg_tpis{
      padding:10px;

      position: relative;
      z-index: 999;
      margin-top:-50px;
      label{
        color:#FF9600;
      }
    }


  }

  .shxx{
    padding:10px;
    h3{
      margin:0;padding:5px 0 15px 0;
      border-bottom: 1px dashed #EEE;
      position: relative;
      .labelImg{
        position: absolute;
        width:84px;
        height:84px;
        z-index: 999;
        img{width:100%;}

        top:-15px; right:-15px;
      }
    }
    ul{
      padding:10px 0 0 0;

      li{
        padding:5px;
        .lnames{
          color:#999;
        }
        margin:5px 0;
      }
    }
    background: #FFF;
    margin:15px;
    overflow:hidden;
    border-radius: 5px;
    font-size:14px;color:#333;
  }
  .shxx_btn{
    height:44px;
    border:1px solid rgba(28,103,255,1);
    border-radius:5px;
    margin:35px;
    font-size:15px;

    font-weight:500;
    color:rgba(28,103,255,1);
    line-height:44px;
    text-align: center;
  }
</style>
